<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('transfer_order_detail', function (Blueprint $table) {
            $table->id()->comment('id');
$table->integer('order_id')->comment('调拨单据头id');
$table->string('material_no', 100)->comment('品号');
$table->string('from_location', 120)->comment('原始库位');
$table->string('from_lotnum', 100)->comment('原始箱号');
$table->string('to_location', 100)->comment('目标库位代码');
$table->string('to_lotnum', 100)->comment('目标箱号');
$table->decimal('qty')->comment('调拨数量');
$table->string('from_wms', 100)->comment('原始仓库代码');
$table->string('to_wms', 100)->comment('目标仓库代码');
$table->string('unit', 10)->comment('单位编码');
$table->creatorId();
$table->createdAt();
$table->updatedAt();
$table->deletedAt();

$table->engine='InnoDB';
$table->comment('调拨单据明细');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('transfer_order_detail');
    }
};
